#ifndef _CONTAINER_H 
#include <stdio.h>
#include <stdlib.h>

typedef struct Element
{
	void *data;
	int index;
	struct Element *left;
	struct Element *right;
} Element, *pElement;

typedef struct Container
{
	pElement head;
	pElement tail;
	int size;
} Container, *pContainer;

extern pElement CreateNode (void *data, int index);

extern pContainer CreateList ();  

extern pElement FindNodeByValue (pContainer list, void *data);

extern pElement FindNodeByIndex (pContainer list, int index);

extern pContainer InsertNodeAt (pContainer list, void *data, int index);
 
extern pContainer InsertNode (pContainer list, void *data);
 
extern pContainer DeleteNodeAt (pContainer list, int index);

extern pContainer DeleteNode (pContainer list, void *data);

extern void PrintList (pContainer list); 

extern void ReverPrint (pContainer list);

extern void DeleteList (pContainer list); 

extern void Swap (pContainer list, int first, int second);

extern void Shuffle (pContainer list);

extern pElement Random (pContainer list);

#endif
